package com.paoyx.ydnote.adapter;

import com.paoyx.ydnote.fragment.*;
import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;


public class MainFragmentAdapter extends FragmentPagerAdapter {
    private String[] titleStr = {"新建笔记","全部笔记","笔记本","照片中转站","更多"};
    public MainFragmentAdapter(FragmentManager fm) {
        super(fm);
        // TODO Auto-generated constructor stub
    }
    public MainFragmentAdapter(FragmentManager fm, Context context) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        // TODO Auto-generated method stub
        switch (position) {
        case 0:
            return YouDaoFragmentOne.newInstance();
        case 1:
            return YouDaoFragmentTwo.newInstance();
        case 2:
            return YouDaoFragmentThree.newInstance();
        case 3:
            return YouDaoFragmentFour.newInstance();
        case 4:
            return YouDaoFragmentFive.newInstance();
        }
        return null;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return titleStr[position];
    }

    @Override
    public int getItemPosition(Object object) {
        return POSITION_NONE;
    }
    @Override
    public int getCount() {
        // TODO Auto-generated method stub
        return titleStr.length;
    }

    
}
